import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        int n = s.length;
        int count = 1;
        int ret = 0;
        for(int i=0;i<n-1;i++) {
            if(s[i]!='-')
                ret += (count++)*(s[i]-'0');
        }
        ret %=11;
        if(ret==s[n-1]-'0'||ret==10&&s[n-1]=='X') System.out.print("Right");
        else {
            s[n-1] = ret==10?'X':(char)(ret+'0');
            for(char x:s) {
                System.out.print(x);
            }
        }
    }
}